import com.bbc.test.ClassTest;

/**
 * com.bbc.data.Input ...
 * 
 * @usage <pre></pre>
 * 
 * @example <pre></pre>
 * 
 */
class com.bbc.data.Input {
	
	private var name : String;
	
	private var id : Number;
	
	private var date : Date;
	
	private var created : Boolean;
	
	
	/**
	 * Input ...
	 * 
	 * @param name - ...
	 * @param id - ...
	 * @param date - ...
	 */
	public function Input(name : String, id : Number, date : Date) {
		init(name, id, date);
		this.created = false;
		createRecord();
	}
	
	
	/**
	 * init ...
	 * 
	 * @param name - ...
	 * @param id - ...
	 * @param date - ...
	 * 
	 * @return Object ...
	 */
	private function init(name : String, id : Number, date : Date) : Object {
		this.date = date;
		this.id = id;
		this.name = name;
	}
	
	
	/**
	 * createRecord ...
	 */
	private function createRecord() {
		if(!created) {
			Record.sendData(id, date, name);
		}
	}
	
	
	/**
	 * toString ...
	 * 
	 * @param Void - ...
	 * 
	 * @return String ...
	 */
	public function toString(Void) : String {
		return "Input";
	}

}